<template>
    <div class="info-bar">
        <div class="infobar-item"><span>@江在川上曰</span></div>
        <div class="infobar-item"><span>少玩手机多睡觉</span></div>
        <div class="infobar-item music-item">
            <span class="iconfont icon-yinfu1"></span>
            <div class="music-name">
                <span data-text="前端全栈开发工程师">前端全栈开发工程师</span>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    name:"InfoBar",
    data(){

    }
}
</script>

<style lang="less" scoped>
    .info-bar{
        font-size: 16px;
        padding-left: 10px ;
        color: #fff;
        .infobar-item{
            padding: 5px 0;
            // width: 100%;
            
            
            
            

        }
        
    }

    .music-item{
       
        display: flex;
        .icon-yinfu1{
            
 
            margin-right: 10px;
            display: inline-block;
        }
        .music-name{

            width: 200px;
            // border: 1px solid #fff;
            white-space: nowrap;
            overflow: hidden;
        
            span{
                font-size:16px ;
                color: #fff;
                display: inline-block;
                animation: scroll 3s linear infinite ;
            }
            span::after{
                color: #fff;
                display: inline-block;
                content: attr(data-text);
                margin-left: 40px;
            }
        }
    }
    @keyframes scroll{
        from{
            transform: translateX(0);
        }
        to{
            transform: translateX(calc(-50% - 40px));
        }
    }
</style>